The \f3Bignum\f1 class implements common arithmetic exception
handling and provides application support for detecting negative infinity, positive infinity, overflow, and underflow that may result from an operation. If one of these conditions is detected, an exception is raised. The programmer can provide an exception handler at runtime to take care of this problem. If no such handler is available, an error message is printed and program execution terminates. See Section 13 for more information on the cool exception handling mechanism.
.SH Base Classes
.SH Friend Classes
None
.SH Constructors
.TP
inline Bignum ();
Simple constructor to create a near-infinite precision integer object
initialized to zero.
.TP
\f3Bignum (const char* \f2str\f3);\f1
Constructor to create a near-infinite precision integer object from the
character string representation
str .
.TP
\f3Bignum (double \f2d\f3);\f1
Constructor to create a near-infinite precision integer object from the double
value
d .
.TP
\f3Bignum (long \f2l\f3);\f1
Constructor to create a near-infinite precision integer object from the long
integer value
l .
.TP
\f3Bignum (const Bignum& \f2bn\f3);\f1
Constructor to create a near-infinite precision integer object from
bn .
.SH Member Functions
.TP
operator double ();
Overloaded operator to provide implicit conversion between
Bignum
objects and
the built-in
double
type when appropriate.
.TP
operator float ();
Overloaded operator to provide implicit conversion between
Bignum
objects and
the built-in
float
type when appropriate.
.TP
operator int ();
Overloaded operator to provide implicit conversion between
Bignum
objects and
the built-in
int
type when appropriate.
.TP
operator long ();
Overloaded operator to provide implicit conversion between
Bignum
objects and
the built-in
long
type when appropriate.
.TP
Bignum operator\- () const;
Overloads the unary minus operator for the
Bignum
class and returns a new
object whose value is the negated value of the object. If the operation results
in an arithmetic error of some type, the appropriate exception is raised.
.TP
\f3Bignum& operator= (const char* \f2str\f3);\f1
Overloads the assignment operator for the
Bignum
class and assigns the integer
representation from the character string
str
to the infinite precision integer
object. A reference to the updated object is returned.